package com.itkf.core.rejectHandle;

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.ThreadPoolExecutor;

@Slf4j
public class MyCallerRunsPolicy extends RejectHandle {
    @Override
    public String Mark() {
        return "CallerRuns";
    }

    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        log.error("线程池启用调用者运行策略");
        r.run();
    }
}
